import React, { PureComponent, Component } from 'react';
import moment from 'moment'
import {
    View,
    Text,
    StyleSheet,
    TouchableOpacity
} from 'react-native'
import WXStyle from '../utils/style/wxstyle';
import Style from '../utils/style/style';
import Icon from 'react-native-vector-icons/FontAwesome'
export default class IconCellItem extends PureComponent {
    constructor(props) {
        super(props)
    }
    render() {
        const { title, content, noBorder, iconName, iconSize, otherData, showAngle, iconColor } = this.props
        return (
            <TouchableOpacity style={[styles.qrcode]} onPress={this.props.pressCode}>
                <View style={[Style.dfr, Style.aic, Style.jsfa]}>
                    <Icon name={iconName} size={iconSize} color={iconColor} />
                    <Text style={styles.text}>{title}</Text>
                </View>
                <View style={[styles.icon]}>
                    <Text style={styles.text}>{otherData}</Text>
                    {showAngle ? <Icon name="angle-right" size={17}></Icon> : null}
                </View>
            </TouchableOpacity>
        )
    }
}

const styles = StyleSheet.create({
    qrcode: {
        flexDirection: 'row',
        alignItems: 'center',
        justifyContent: 'space-between',
        width: Style.width,
        height: 39,
        paddingLeft: 15,
        paddingRight: 15,
    },
    text: {
        marginLeft: 5,
        fontSize: 17,
        color: WXStyle.mainColor
    },
})